-- GENERATED SPELL FOR [Sunfury Centurion] --


function spell0_20140(pUnit, Event) --@Enrage,Self--
pUnit:FullCastSpellOnTarget(8599,pUnit)
pUnit:RegisterEvent('Sorts_20140', 680, 1)
end

function spell1_20140(pUnit, Event) --@Spellbreaker,n/a--
pUnit:FullCastSpellOnTarget(35871,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20140', 570, 1)
end

function Sorts_20140(pUnit, Event)
local choix_sorts_20140 = math.random(0, 1)
if choix_sorts_20140 == 0 then
pUnit:RegisterEvent('spell0_20140', 1, 1)
end
if choix_sorts_20140 == 1 then
pUnit:RegisterEvent('spell1_20140', 1, 1)
end
end

function mob20140_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_20140', math.random(1500, 3000), 1)
end

function mob20140_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob20140_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob20140_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(20140, 1, 'mob20140_Action')
RegisterUnitEvent(20140, 2, 'mob20140_Leave')
RegisterUnitEvent(20140, 3, 'mob20140_Kill')
RegisterUnitEvent(20140, 4, 'mob20140_Die')
